import request from '@/utils/request'

// 查询考勤机列表
export function listMachine(query) {
  return request({
    url: '/iot/machine/list',
    method: 'get',
    params: query
  })
}

// 识别记录
export function recordList(query) {
  return request({
    url: '/iot/machine/recordList',
    method: 'get',
    params: query
  })
}

// 查询考勤机详细
export function getMachine(attendanceMachineId) {
  return request({
    url: '/iot/machine/' + attendanceMachineId,
    method: 'get'
  })
}

// 新增考勤机
export function addMachine(data) {
  return request({
    url: '/iot/machine',
    method: 'post',
    data: data
  })
}

// 修改考勤机
export function updateMachine(data) {
  return request({
    url: '/iot/machine',
    method: 'put',
    data: data
  })
}

// 删除考勤机
export function delMachine(attendanceMachineId) {
  return request({
    url: '/iot/machine/' + attendanceMachineId,
    method: 'delete'
  })
}
